# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Newbyte <newbytee@protonmail.com>
pkgname=py3-cairocffi
_pkgname=cairocffi
pkgver=1.3.0
pkgrel=0
pkgdesc="Python CFFI-based binding to Cairo and GDK-PixBuf"
url="https://github.com/Kozea/cairocffi"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-cffi cairo gdk-pixbuf py3-xcffib"
checkdepends="
	py3-pytest py3-pytest-cov py3-pytest-isort py3-pytest-flake8 ttf-dejavu
"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
options="!check" # tests broken

replaces="py-cairocffi" # For backwards compatibiltiy
provides="py-cairocffi=$pkgver-r$pkgrel" # For backwards compatibility

prepare() {
	default_prepare
	sed /pytest-runner/d -i setup.cfg
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}


sha512sums="
be459a5f4c1986cf339b7b15fdb7d3ac52476c8c31ff663b4708917ce8abd6fc66860d1966744b69aebf7aebca4415b32166df79505ad42f315ffd76d7163d7e  cairocffi-1.3.0.tar.gz
"
